package com.loop.stringDemo;

/**
 * String类的构造方法
 */
public class StringDemo {
    public static void main(String[] args) {
        String str1 = "abc";
        String str2 = "abc";
        String str3 = new String("abc");
        char[] chs = {'a','b','c'};
        String str4 = new String(chs);
        System.out.println(str1==str3);
        String str5 = new String(chs,1,2);
        char a =66;
        byte[] b = {66,67,68};
        String str6 = new String(b,1,2);
        System.out.println(str6);
    }
}
